package com.pengpeng.rabbitmq.exception;

import com.pengpeng.rabbitmq.constants.Constants;

/**
 * @author 彭鹏
 * @date 2021/10/19.
 */
public class RabbitMQExceptionUtils {
    /**
     * 实例化RabbitMQException的异常
     *
     * @param errMsg
     * @return
     */
    public static RabbitMQException throwRabbitMQException(String errMsg) {
        return new RabbitMQException(errMsg);
    }

    /**
     * 实例化默认的RabbitMQException的异常
     *
     * @return
     */
    public static RabbitMQException throwRabbitMQException() {
        return new RabbitMQException(Constants.PARAMETER_DEFAULT_NOT_NULL_EXCEPTION_MSG);
    }
}
